var width = document.getElementById("width");
var height = document.getElementById("height");
var calculate = document.getElementById("calculate");
var perimeter = document.getElementById("perimeter");
var area = document.getElementById("area");
calculate.onclick = function () {
    perimeter.value = 2 * width.value + 2 * height.value;
    area.value = width.value * height.value;
};
